﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfConstantEditor.aspx.cs"
    Inherits="msBsc.WebUi.wfConstantEditor" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>常量信息编辑</title>
    <style type="text/css">
        html, body { overflow: hidden; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; }
    </style>
    <script type="text/javascript">
        $(window).load(function () {
            //            $.ploadFile("Grid", function (script, textStatus) {
            initGrid1();
            //            });
            //            $.ploadFile("layer", function (script, textStatus) {
            ////                layer.load('加载中'); 
            //            });
        });
        function initGrid1() {
            var colsOption = [
            { id: 'chk', isCheckColumn: true, filterable: false, exportable: false },
            { id: 'CONSTANT_DICT_ID', hidden: true, filterable: false, exportable: false },
            { id: 'CONSTANT_CATEGORY_CID', hidden: true, filterable: false, exportable: false },
            { id: 'SEQ_NUM', header: "序号", filterable: false, width: 40, editor: { type: 'text' }, renderer: function (value, record, columnObj, grid, colNo, rowNo) {
                if (!record.SEQ_NUM) record.SEQ_NUM = grid.getPageInfo().startRowNum + rowNo; return record.SEQ_NUM;
            }
            },  
            { id: 'CONSTANT_VALUE', header: "常量项标识代码", width: 120, editor: { type: 'text', validRule: ['R', 'B'] }, inChart: true },
            { id: 'CONSTANT_DISP_TEXT', header: "常量项说明文本", width: 220, editor: { type: 'text', validRule: ['R', 'S'] }, inChart: true },
            { id: 'CONSTANT_VALUE_DESC', header: "常量项配置信息", width: 220, editor: { type: 'text'} },
            { id: 'REC_ACTIVE', header: "是否有效", width: 100, editor: { type: "select", options: clopCheckBox
             , defaultText: 'False'
            }, renderer: clrdCheckBox
            }
            ];
            var gridOption1 = getGtOp('myGrid1', colsOption, 'gridbox1', 'CONSTANT_DICT_ID');
            //            gridOption1.height = "500px";
            gridOption1.autoLoad = true;
            //            gridOption1.autogtResize = false;
            var myGrid1 = new Sigma.Grid(gridOption1);
            myGrid1.render();
            myGrid1.readOnly = false;
            //            btnDo("btnEdit");
            autogtResize("bigbox2", myGrid1);
        };

        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = GetGtParam("myGrid1");
            if (sEbtn == "btnSave") {
                doSaveGt('myGrid1');
            }
            else {
                ajaxComm(opart); //调用页面回调，并传入参数
            }
            GtGrid1Action = "";
        };
        function GetGtParam(jqGridID) {
            var _jsParam = new jsonRow();
            if (jqGridID == "myGrid1") {
                GetFormJson("divCondition", _jsParam);
                _jsParam.AddCell("gtGridID", "myGrid1");
                _jsParam.AddCell("ID", $("#txtConstTypeCid").val());
                _jsParam.AddCell("ACTION", GtGrid1Action);
                //这里可增加传入后台的参数
            } return _jsParam;
        };
    </script>
</head>
<body>
               
        <div id="fragment1">
            <div id="divCondition" style="margin: 0px; border-style: solid; border-width: 1px;
                border-color: #C8D2E0;">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                        <td align="right"> 
                            <input type="button" onclick="javascript:btnDo('btnSave');return false;" value="保存(S)"
                                id="btnSave" accesskey="S" /> 

                        </td>
                        <td> 
                        </td>
                    </tr>
                </table>
            </div>
            <div id="bigbox1" style="margin: 0px; margin-top: 2px;">
                <div id="gridbox1" style="border: 0px solid #cccccc; background-color: #f3f3f3; padding: 5px;margin-left:-1px;">
                </div>
            </div> 
        </div>
    <input value="" type="hidden" id="txtConstTypeCid"  name="txtConstTypeCid"/>
        
</body>
</html>
